Mock.mock = function () {
    
}
const Mock = require('mock.js')

const Random = Mock.Random

let Result = {
    code: 200,
    msg: "操作成功",
    data: null
}

Mock.mock('/api/captcha','get',() =>{
    Result.data={
        token: Random.string(32),
        captchaImg: Random.dataImage('120x40','p7n5w')
    }
    return Result
})

Mock.mock('/api/user/sys/menu/nav','get',() =>{
    let nav = [
        {
            title:'系统管理',
            name:'SysManger',
            icon:'el-icon-s-operation',
            component:'',
            path:'',
            children:[
                {
                    title:'用户管理',
                    name:'SysUser',
                    icon:'el-icon-s-customer',
                    component:'sys/User',
                    path:'/sys/user',
                    children:[]
                }
            ]
        },{
            title:'系统工具',
            name:'SysTool',
            icon:'el-icon-s-tools',
            component:'',
            path:'',
            children:[
                {
                    title:'数字字典',
                    name:'SysUser',
                    icon:'el-icon-s-order',
                    component:'',
                    path:'/sys/dict',
                    children:[]
                }                        ]
        }
    ]

    let authorities = []
    Result.data={
        nav: nav,
        authorities: authorities
    }
    return Result
})